validate region EP param is a valid host label#3697
Merged
Conversation
pulimsr
approved these changes
Jan 22, 2026
926d384 to
8cb6db0
Compare
8cb6db0 to
a4cdf35
Compare
| static const char* FIPS_SUFFIX = "-fips"; | ||
| if (config.region.rfind(FIPS_PREFIX, 0) == 0) { | ||
| if (!Aws::Utils::IsValidDnsLabel(config.region)) { | ||
| AWS_LOGSTREAM_ERROR(ENDPOINT_BUILTIN_LOG_TAG, "Invalid region name: " << config.region); |
Contributor
There was a problem hiding this comment.
sanity check: logstream error causes the function to error?
Contributor
Author
There was a problem hiding this comment.
No it just logs a failure, since the function returns void, and we have exceptions disabled we cannot return a real "error" from the function. the failure mode is that the region built in parameter region is not set. It fails in endpoint resolution because region is not set. Hypothetically if a endpoints rule set did not require region, resolution would still work.
42a9404 to
00d3158
Compare
00d3158 to
55bb1b9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes:
Adds a check to the region builtin endpoint parameter to make sure the region is a valid host label. This will fail to set the region EP parameter failing endpoints resolution for the client so no call is made.
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.